package com.mobile.dao;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import com.mobile.gridUtil.GridFilter;
/**
 * 公用的分页部分类
 * @author hf
 *
 */
public class PageImplDAO {
	/**
	 * 
	 * @param cl				要处理的类的类
	 * @param gridFilterList	
	 * @return
	 */
	protected DetachedCriteria createDetachedCriteria(Class cl,List<GridFilter> gridFilterList){
		DetachedCriteria criteria=DetachedCriteria.forClass(cl);
		for(GridFilter gf :gridFilterList){
			gf.createCriteria(criteria);
		}
		return criteria;
	}
}
